if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetAllProductByCateID]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetAllProductByCateID]
GO
CREATE PROC sp_GetAllProductByCateID
	@cateID	int
AS
BEGIN
	SELECT A.ID, B.CategoryName, A.ProductName, A.Image, A.Description, A.Price 
		FROM Product As A INNER JOIN Categories As B ON A.CategoryID = B.ID
		WHERE A.CategoryID = @cateID
END